package com.pzb.wechat.domain;

import java.io.Serializable;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.pzb.common.annotation.Excel;

/**
 * 授权信息对象 wechat_authorization
 * 
 * @author Mr_Wu
 * @date 2022-01-04
 */
public class WechatAuthorization implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** 编号 */
    private Long id;

    private Date createTime;

    /** 小程序appid */
    private String authorizerAppid;

    /** 授权码 */
    @Excel(name = "授权码")
    private String authorizationCode;

    /** 过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date authorizationCodeExpiredTime;

    /** 取消授权时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date unAuthorizationCodeExpiredTime;

    /** 授权方令牌 */
    private String authorizerAccessToken;

    /** 令牌有效期/秒 */
    private String expiresIn;

    /** 刷新令牌 */
    private String authorizerRefreshToken;

    /** 权限集列表 */
    private String funcInfo;

    /** 刷新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date refreshTime;

    private String qrcodeUrl;

    /** 授权状态 0已授权  1取消授权 */
    private Integer authStatus;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public void setAuthorizerAppid(String authorizerAppid)
    {
        this.authorizerAppid = authorizerAppid;
    }

    public String getAuthorizerAppid() 
    {
        return authorizerAppid;
    }
    public void setAuthorizationCode(String authorizationCode) 
    {
        this.authorizationCode = authorizationCode;
    }

    public String getAuthorizationCode() 
    {
        return authorizationCode;
    }
    public void setAuthorizationCodeExpiredTime(Date authorizationCodeExpiredTime)
    {
        this.authorizationCodeExpiredTime = authorizationCodeExpiredTime;
    }

    public Date getAuthorizationCodeExpiredTime()
    {
        return authorizationCodeExpiredTime;
    }
    public void setUnAuthorizationCodeExpiredTime(Date unAuthorizationCodeExpiredTime)
    {
        this.unAuthorizationCodeExpiredTime = unAuthorizationCodeExpiredTime;
    }

    public Date getUnAuthorizationCodeExpiredTime()
    {
        return unAuthorizationCodeExpiredTime;
    }
    public void setAuthorizerAccessToken(String authorizerAccessToken) 
    {
        this.authorizerAccessToken = authorizerAccessToken;
    }

    public String getAuthorizerAccessToken() 
    {
        return authorizerAccessToken;
    }
    public void setExpiresIn(String expiresIn) 
    {
        this.expiresIn = expiresIn;
    }

    public String getExpiresIn() 
    {
        return expiresIn;
    }
    public void setAuthorizerRefreshToken(String authorizerRefreshToken) 
    {
        this.authorizerRefreshToken = authorizerRefreshToken;
    }

    public String getAuthorizerRefreshToken() 
    {
        return authorizerRefreshToken;
    }
    public void setFuncInfo(String funcInfo) 
    {
        this.funcInfo = funcInfo;
    }

    public String getFuncInfo() 
    {
        return funcInfo;
    }
    public void setRefreshTime(Date refreshTime) 
    {
        this.refreshTime = refreshTime;
    }

    public Date getRefreshTime() 
    {
        return refreshTime;
    }
    public void setAuthStatus(Integer authStatus) 
    {
        this.authStatus = authStatus;
    }

    public String getQrcodeUrl() {
        return qrcodeUrl;
    }

    public void setQrcodeUrl(String qrcodeUrl) {
        this.qrcodeUrl = qrcodeUrl;
    }

    public Integer getAuthStatus()
    {
        return authStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("createTime", getCreateTime())
            .append("authorizerAppid", getAuthorizerAppid())
            .append("authorizationCode", getAuthorizationCode())
            .append("authorizationCodeExpiredTime", getAuthorizationCodeExpiredTime())
            .append("unAuthorizationCodeExpiredTime", getUnAuthorizationCodeExpiredTime())
            .append("authorizerAccessToken", getAuthorizerAccessToken())
            .append("expiresIn", getExpiresIn())
            .append("authorizerRefreshToken", getAuthorizerRefreshToken())
            .append("funcInfo", getFuncInfo())
            .append("refreshTime", getRefreshTime())
            .append("authStatus", getAuthStatus())
            .toString();
    }
}
